<fieldset class="fieldset">
    <legend>Thông tin banner default</legend>
    <table class="tbl-list tbpadd" width="100%" border="1">
        <thead>
            <tr>
                <td class="td-label bold">
    				#
    			</td>
                <td class="td-label bold">
    				Preview
    			</td>
    			<td class="td-label bold">
                    Quảng cáo
    			</td>
    			<td class="td-label bold">
    				Type
    			</td>
                <td class="td-label bold">
    				User
    			</td>
            </tr>
        </thead>
        <tbody>
			<?php $index=1;
            foreach($info as $if)
            {
            ?>
			<tr>
				<td class="ver-middle" width="16" >
					<p class="mar5 text-center">
						<?php echo $index;?>
					</p>
				</td>
                <td class="ver-middle">
					<p class="bold">
						<?php echo $if['bannername'];?>
					</p>
					
					<p class="breview-box-domain">
						<?php echo $this->mycommon->getDomainFromUrl($if['url']);?>
					</p>
					<div class="myclear padtop5">
						<p class="breview-box-img">
                            <a href="<?php echo $if['url'];?>" target="_blank">
							   <img alt="" src="<?php echo $if['filepath'];?>" width="50"/>
                            </a>
						</p>
						<div class="breview-box-bodytext">
							<?php echo $if['bannertext'];?>
						</div>
					</div>
				</td>
				<td class="ver-middle">
					<div>
						<p >
                            <a href="<?php echo site_url('bannerdetail/index?bannerid='.$if['bannerid'].'&fromdate='.date('Y-m-d',strtotime($fromdate)).'&todate='.date('Y-m-d',strtotime($todate)))?>">
							   <?php echo $if['bannername'];?>
                            </a>
						</p>
						<p>
                            <a style="color: gray;" href="<?php echo site_url('campaigndetail/index?campaignid='.$if['campaignid'].'&fromdate='.date('Y-m-d',strtotime($fromdate)).'&todate='.date('Y-m-d',strtotime($todate)))?>">
							   <?php echo $if['campaignname'];?>
                            </a>
						</p>
					</div>
				</td>
				<td class="ver-middle">
                    <?php echo $if['campaignname']==0 ? 'AdMarket':'Muachung'?>
				</td>
                <td class="ver-middle">
                    <?php echo $if['username'];?>
				</td>
			</tr>
			<?php
            $index++;
            }
            ?>
        </tbody>
    </table>
</fieldset>
<div id="pager" style="font-family: tahoma;border: solid 1px #D6D6D6;float: right; margin-top: 10px;background-color: white;padding:3px 10px 4px;">
    <table cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td class="ver-middle">
                <span class="ver-middle"><?php echo 'Trang' . '  <span id="pagedisplay">' . $page.'/'.$totalpage .'</span>';?></span>
            </td>
            <td class="ver-middle padleft5 padright5" style="padding-bottom: 2px;">
                <img src="/images/imgpre.gif" class="prev ver-middle" id="prev" <?php echo ($page > 1) ? 'onclick="campPaging(\'' . site_url("report/ajaxBannerDefaultReport?page=".($page-1)."&rownum=".$rownum).'\');"' : ''; ?>/>
                <img src="/images/imgnext.gif" class="next ver-middle" id="next" <?php echo ($page < $totalpage) ? 'onclick="campPaging(\'' . site_url("report/ajaxBannerDefaultReport?page=".($page+1)."&rownum=".$rownum).'\');"' : ''; ?>/>
            </td>
            <td style="padding-top: 2px;">
                <select class="pagesize ver-middle" style="border: 0;background: #fff;" id="pagesize" onchange="campPaging('<?php echo site_url("report/ajaxBannerDefaultReport?page=1&rownum="); ?>' + this.value);">
        			<option value="10" <?php echo ($rownum==10) ? 'selected="selected"':'' ;?>>10</option>
        			<option value="20" <?php echo ($rownum==20) ? 'selected="selected"':'' ;?>>20</option>
        			<option value="30" <?php echo ($rownum==30) ? 'selected="selected"':'' ;?>>30</option>
        			<option value="40" <?php echo ($rownum==40) ? 'selected="selected"':'' ;?>>40</option>
        		</select>
            </td>
        </tr>
    </table>
</div>
<br/>
<br/>
<br/>
<br/>
<script type="text/javascript">
    function campPaging(url)
	{
    	$.ajax({
    		url: url,
    		success: function(data){
    			$img.hide();
    			$obj.html(data);
    		}
    	});
	}
</script>